import Vue from 'vue'
import VueRouter from 'vue-router'
import Index from '../layout/home/index.vue'
import Homepage from '../layout/home/homepage.vue'

import Login from '../layout/login/Login.vue';
Vue.use(VueRouter)
// 用户管理
const User = () => import("../views/user/user_user")
const User_role = () => import("../views/user/user_role")
// 项目管理
import Project_class from "../views/project/project_class"
import Project_set from "../views/project/project_set"
// 学生管理
import achievement_manage from '../views/student/02achievement_manage'
import achievement_query from '../views/student/03achievement_query'
import achievement_input from '../views/student/04achievement_input'
import achievement_group from '../views/student/05achievement_group'
import system_manage from '../views/student/06system_manage'
import system_query from '../views/student/07system_query'
import system_enter from '../views/student/08system_enter'
import system_rules from '../views/student/09system_rules'
import prize_manage from '../views/student/10prize_manage'
import works_show from '../views/student/11works_show'
import show_group from '../views/student/12show_group'
// 课程管理
import course_manage from '../views/course/course_manage';
// 菜单管理
import menu_manage from '../views/menu/menu_manage';
// 日志管理
import log_manage from '../views/log/log_manage'
// 审核管理
import audit_manage from '../views/audit/audit_manage';
// 消息管理
import message_manage from '../views/message/message_manage';
const routes = [{
  path: '/',
  redirect: '/login'
},
// 用户登录
{
  path: '/login',
  name: 'Login',
  component: Login
},
// 主页
{
  path: '/index',
  component: Index,
  children: [
    // 主页
    {
      path: "/",
      name: "home",
      component: Homepage,
    },
    // 用户管理
    {
      path: "/user",
      name: "user",
      component: User,
    },
    {
      path: "/role",
      name: "role",
      component: User_role
    },
    // 项目管理
    {
      path: "/project_class",
      name: "project_class",
      component: Project_class
    },
    {
      path: "/project_set",
      name: "project_set",
      component: Project_set
    },
    // 成绩管理
    {
      path: "/achievement_manage",
      name: "achievement_manage",
      component: achievement_manage
    },
    {
      path: "/achievement_query",
      name: "achievement_query",
      component: achievement_query
    },
    {
      path: "/achievement_input",
      name: "achievement_input",
      component: achievement_input
    },
    {
      path: "/achievement_group",
      name: "achievement_group",
      component: achievement_group
    },
    // 制度管理
    {
      path: "/system_manage",
      name: "system_manage",
      component: system_manage
    },
    {
      path: "/system_enter",
      name: "system_enter",
      component: system_enter
    },
    {
      path: "/system_query",
      name: "system_query",
      component: system_query
    },
    {
      path: "/system_rules",
      name: "system_rules",
      component: system_rules
    },
    {
      path: "/prize_manage",
      name: "prize_manage",
      component: prize_manage
    },
    {
      path: "/works_show",
      name: "works_show",
      component: works_show
    },
    {
      path: "/show_group",
      name: "show_group",
      component: show_group
    },
    {
      path: "/course_manage",
      name: "course_manage",
      component: course_manage
    },
    {
      path: "/menu_manage",
      name: "menu_manage",
      component: menu_manage
    },
    {
      path: "/log_manage",
      name: "log_manage",
      component: log_manage
    },
    {
      path: "/audit_manage",
      name: "audit_manage",
      component: audit_manage
    },
    {
      path: "/message_manage",
      name: "message_manage",
      component: message_manage
    },
  ]
},

]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router